﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="MovimientosT.ascx.vb"
    Inherits="Content_Portafolio_Port_controls_MovimientosT" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<%--<script type="text/javascript">
    function SearchList()
    {
        //var l =  ;
        var tb = document.getElementById('<%= TextBox1.ClientID %>');
        for (var i=0; i < document.getElementById('<%= lb_ClientesDispon.ClientID  %>').options.length; i++)
        {
            if (document.getElementById('<%= lb_ClientesDispon.ClientID  %>').options[i].value.toLowerCase().match(tb.value.toLowerCase()))
            {
                document.getElementById('<%= lb_ClientesDispon.ClientID  %>').options[i].selected = true;
                return false;
            }
            else
            {
                ClearSelection();
            }
        }
    }
    function ClearSelection()
    {
        document.getElementById("listbox1").selectedIndex = -1;
    }
</script>--%>

<%--<style type="text/css">
    body
    {
        font: normal 12px auto "Trebuchet MS", Verdana;   
        background-color: #ffffff;
        color: #4f6b72;      
    }
 
    .popUpStyle
    {
        font: normal 11px auto "Trebuchet MS", Verdana;   
        background-color: #ffffff;
        color: #4f6b72; 
        padding:6px;     
        filter: alpha(opacity=80);
        opacity: 0.8;
    }
   
    .drag
    {
         background-color: #dddddd;
         cursor: move;
         border:solid 1px gray ;
    }
</style>--%>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

<%--<script language="VB" runat="server">
 
      Sub LinkButton_Click(sender As Object, e As EventArgs) 
        'Label1.Text = "You clicked the link button"
        Dim gridView_toExport As New GridView
        Dim IControles As New Clases.controles
        IControles.fillGridViewPaging(gridView_toExport, Session("ExpMT"))

        For i As Integer = 0 To gridView_toExport.Rows.Count - 1
            Dim row As GridViewRow = gridView_toExport.Rows(i)
        Next

        Dim sb As StringBuilder = New StringBuilder()
        Dim sw As IO.StringWriter = New IO.StringWriter(sb)
        Dim htw As HtmlTextWriter = New HtmlTextWriter(sw)
        Dim pagina As Page = New Page
        Dim form = New HtmlForm
        pagina.EnableEventValidation = False
        pagina.DesignerInitialize()
        pagina.Controls.Add(form)
        gridView_toExport.AllowPaging = False
        form.Controls.Add(gridView_toExport)
        pagina.RenderControl(htw)
        Response.Clear()
        Response.Buffer = True
        Response.ContentType = "application/vnd.ms-excel"

        Response.AddHeader("Content-Disposition", "attachment;filename=DetalleMovimientosTitulos" & Now.ToString("_dd_MMMM_yy_HH_mm_ss") & ".xls")
        Response.Charset = "UTF-8"
        Response.ContentEncoding = Encoding.Default
        Response.Write(sb.ToString())
        Response.End()
        End Sub
      
      
</script>--%>

<center>
    <asp:label id="lbl_headerUsers" runat="server" cssclass="titulos" text="Movimientos Titulos"></asp:label>
</center>
<center>
    <asp:panel id="Panel1" runat="server" cssclass="divContent">
<%--<asp:UpdatePanel ID="UPanel1" runat="server" UpdateMode="Always" >
<ContentTemplate>--%>

<table class="tabMovimiento">
        <tr>
            <td>
                <asp:Label ID="Label1" runat="server" Text="Fecha de Operación"></asp:Label>
            </td>
            <td>
                
                <asp:TextBox ID="txtFecha" runat="server" AutoPostBack="true" Width="150px" Enabled="True" ></asp:TextBox>
                <asp:ImageButton ID="img_cal1" runat="server" 
                    ImageUrl="~/images/calendar.gif" />
                <asp:CalendarExtender ID="calendar" runat="server" format="yyyy-MM-dd" PopupButtonID="img_cal1" TargetControlID="txtFecha">
                </asp:CalendarExtender>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Display="None" ControlToValidate="txtFecha"
                    ErrorMessage="Campo obligatorio" ForeColor="Red"/>
                <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" CloseImageUrl="~/images/close.gif"
                    CssClass="validatorCallout" HighlightCssClass="validatorCalloutHighlight"
                    TargetControlID="RequiredFieldValidator1" WarningIconImageUrl="~/images/Warning.png" Enabled="True"/>
                    <asp:RangeValidator ID="RangeValidator1" runat="server" Display="None" ControlToValidate="txtFecha" ForeColor="Red" ErrorMessage="La fecha del operación no puede ser mayor al día de Hoy"/>
                    <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender10" runat="server" CloseImageUrl="~/images/close.gif"
                    CssClass="validatorCallout" HighlightCssClass="validatorCalloutHighlight"
                    TargetControlID="RangeValidator1" WarningIconImageUrl="~/images/Warning.png" Enabled="True"/>
                  
                
                </td>
            <td class="central">
                &nbsp;
            </td>
            <td>
                <asp:Label ID="Label8" runat="server" Text="Fecha Liquidación"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="lb_fechaL" runat="server" AutoPostBack="true" Width="150px"></asp:TextBox>
                <asp:ImageButton ID="img_cal2" runat="server" 
                    ImageUrl="~/images/calendar.gif" />
                <asp:CalendarExtender ID="CalendarExtender3" runat="server" format="yyyy-MM-dd" PopupButtonID="img_cal2" TargetControlID="lb_fechaL">
                </asp:CalendarExtender>

            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="Label3" runat="server" Text="Tipo de Movimiento"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="ddltipoM" runat="server" AutoPostBack="true" width="152px">
                    <asp:ListItem Value="Compra">Compra</asp:ListItem>
                    <asp:ListItem Value="Venta">Venta</asp:ListItem>
                    <asp:ListItem Value="Entrada Fisica">Entrada Física</asp:ListItem>
                     <asp:ListItem Value="Salida Fisica">Salida Física</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td class="central">
                &nbsp;
            </td>
            <td>
                <asp:Label ID="Label15" runat="server" Text="Tipo de Activo"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="ddlActivo" runat="server" AutoPostBack="true" 
                    width="150px">
                    <asp:ListItem Value="Capital">Capital</asp:ListItem>
                    <asp:ListItem Value="Notas">Notas Estructuradas</asp:ListItem>
                    <asp:ListItem Value="Deuda">Deuda</asp:ListItem>
                    <asp:ListItem Value="Fondos">Fondos de Inversión</asp:ListItem>
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" Display="None" ControlToValidate="ddlActivo"
                    ErrorMessage="Campo obligatorio" ForeColor="Red" InitialValue="None"></asp:RequiredFieldValidator>
                <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender9" runat="server" CloseImageUrl="~/images/close.gif"
                    CssClass="validatorCallout" HighlightCssClass="validatorCalloutHighlight"
                    TargetControlID="RequiredFieldValidator9" WarningIconImageUrl="~/images/Warning.png" Enabled="True"/>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="Label4" runat="server" Text="Tipo de Operacion"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="ddltipoO" runat="server" AutoPostBack="true" 
                    width="152px">
                    <asp:ListItem Value="Global">Global</asp:ListItem>
                    <asp:ListItem Value="Particular">Particular</asp:ListItem>
                    <asp:ListItem Value="Conjunto">Conjunto</asp:ListItem>
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" Display="None" ControlToValidate="ddltipoO"
                    ErrorMessage="Campo obligatorio" ForeColor="Red" InitialValue="None"/>
                <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender7" runat="server" CloseImageUrl="~/images/close.gif"
                    CssClass="validatorCallout" HighlightCssClass="validatorCalloutHighlight"
                    TargetControlID="RequiredFieldValidator7" WarningIconImageUrl="~/images/Warning.png" Enabled="True"/>
            </td>
            <td class="central">
                &nbsp;
            </td>
            <td>
                <asp:Label ID="Label14" runat="server" Text="Despacho"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="ddlDespacho" runat="server" width="150px" 
                    AutoPostBack="True">
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" Display="None" ControlToValidate="ddlDespacho"
                    ErrorMessage="Campo obligatorio: Registre un despacho" ForeColor="Red" InitialValue="None"></asp:RequiredFieldValidator>
                <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender12" runat="server" CloseImageUrl="~/images/close.gif"
                    CssClass="validatorCallout" HighlightCssClass="validatorCalloutHighlight"
                    TargetControlID="RequiredFieldValidator12" WarningIconImageUrl="~/images/Warning.png" Enabled="True"/>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="Label5" runat="server" Text="Institución"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="ddlInstitucion" runat="server" width="150px" AutoPostBack="true">
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" Display="None" ControlToValidate="ddlInstitucion"
                    ErrorMessage="Campo obligatorio: Registre una institución" ForeColor="Red" InitialValue="None"/>
                <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender11" runat="server" CloseImageUrl="~/images/close.gif"
                    CssClass="validatorCallout" HighlightCssClass="validatorCalloutHighlight"
                    TargetControlID="RequiredFieldValidator11" WarningIconImageUrl="~/images/Warning.png" Enabled="True"/>
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                <asp:Label ID="Label6" runat="server" Text="Emisora"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="ddlEmisora" runat="server" width="150px" 
                    AutoPostBack="True">
                </asp:DropDownList>
               <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" Display="None" ControlToValidate="ddlEmisora"
                    ErrorMessage="Campo obligatorio" ForeColor="Red" InitialValue="None"></asp:RequiredFieldValidator>
                <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender8" runat="server" CloseImageUrl="~/images/close.gif"
                    CssClass="validatorCallout" HighlightCssClass="validatorCalloutHighlight"
                    TargetControlID="RequiredFieldValidator8" WarningIconImageUrl="~/images/Warning.png" Enabled="True"/>
            </td>
            
        </tr>
        <tr>
            <td>
                <asp:Label ID="Label9" runat="server" Text="No. Títulos"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtTitulos" runat="server" width="150px" MaxLength="10"></asp:TextBox>
                <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender7" runat="server" 
                                                    FilterType="Numbers" TargetControlID="txtTitulos" Enabled="True" ValidChars=" "></asp:FilteredTextBoxExtender>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" Display="None" ControlToValidate="txtTitulos"
                    ErrorMessage="Campo obligatorio" ForeColor="Red"/>
                <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" CloseImageUrl="~/images/close.gif"
                    CssClass="validatorCallout" HighlightCssClass="validatorCalloutHighlight"
                    TargetControlID="RequiredFieldValidator2" WarningIconImageUrl="~/images/Warning.png" Enabled="True"/>
            </td>
            <td class="central">
                &nbsp;
            </td>
            <td>
                <asp:Label ID="Label10" runat="server" Text="Costo"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtCosto" runat="server" width="150px" MaxLength="20"></asp:TextBox>
                 <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="Formato no valido."
                                    Display="None" ValidationExpression="^[0-99999999999]+(\.[0-9]+)?$" ForeColor="Red" 
                                                    ControlToValidate="txtCosto"></asp:RegularExpressionValidator>
                                                    <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" 
                                                     TargetControlID="txtCosto" 
                                                    Enabled="True" ValidChars="0123456789."></asp:FilteredTextBoxExtender>
                                    <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender26" runat="server"
                                    CloseImageUrl="~/images/close.gif" CssClass="validatorCallout"
                                    HighlightCssClass="validatorCalloutHighlight"
                                    TargetControlID="RegularExpressionValidator2" WarningIconImageUrl="~/images/Warning.png" 
                                                    Enabled="True" />
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" Display="None" ControlToValidate="txtCosto"
                    ErrorMessage="Campo obligatorio" ForeColor="Red"/>
                <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" CloseImageUrl="~/images/close.gif"
                    CssClass="validatorCallout" HighlightCssClass="validatorCalloutHighlight"
                    TargetControlID="RequiredFieldValidator5" WarningIconImageUrl="~/images/Warning.png" Enabled="True"/>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="Label11" runat="server" Text="Plazo" Visible="False"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txt_Plazo" runat="server" Visible="False" width="150px"></asp:TextBox>
                <asp:DropDownList ID="ddlTiempo" runat="server" Visible="false"   >
                    <asp:ListItem Value="Capital">Dias</asp:ListItem>
                    <asp:ListItem Value="Notas">Mes</asp:ListItem>
                    <asp:ListItem Value="Deuda">Año</asp:ListItem>                    
                </asp:DropDownList>
                <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender8" runat="server" TargetControlID="txt_Plazo" 
                    Enabled="True" ValidChars="0123456789"></asp:FilteredTextBoxExtender>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" Display="None" ControlToValidate="txt_Plazo"
                    ErrorMessage="Campo obligatorio" ForeColor="Red"></asp:RequiredFieldValidator>
                <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" CloseImageUrl="~/images/close.gif"
                    CssClass="validatorCallout" HighlightCssClass="validatorCalloutHighlight"
                    TargetControlID="RequiredFieldValidator3" WarningIconImageUrl="~/images/Warning.png" Enabled="True"/>
            </td>
            <td class="central">
                &nbsp;
            </td>
            <td>
                <asp:Label ID="Label12" runat="server" Text="Tasa" Visible="False"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txt_Tasa" runat="server" Visible="False" width="150px"></asp:TextBox>
                <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" FilterType="Numbers,Custom"
                                ValidChars="." TargetControlID="txt_Tasa"/>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" Display="None" ControlToValidate="txt_Tasa"
                    ErrorMessage="Campo obligatorio" ForeColor="Red"></asp:RequiredFieldValidator>
                <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" CloseImageUrl="~/images/close.gif"
                    CssClass="validatorCallout" HighlightCssClass="validatorCalloutHighlight"
                    TargetControlID="RequiredFieldValidator6" WarningIconImageUrl="~/images/Warning.png" Enabled="True"/>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="Label13" runat="server" Text="Plazo Cupón" Visible="False"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txt_Plazo_Cupon" runat="server" Visible="False" width="150px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" Display="None" ControlToValidate="txt_Plazo_Cupon"
                    ErrorMessage="Campo obligatorio" ForeColor="Red"></asp:RequiredFieldValidator>
                <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" CloseImageUrl="~/images/close.gif"
                    CssClass="validatorCallout" HighlightCssClass="validatorCalloutHighlight"
                    TargetControlID="RequiredFieldValidator4" WarningIconImageUrl="~/images/Warning.png" Enabled="True"/>
            </td>
            <td class="central">
                &nbsp;
            </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr><td>
           
            <asp:TextBox ID="txt_BuscaCl" runat="server" Visible="False"></asp:TextBox> <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender7" runat="server" TargetControlID="txt_BuscaCl" WatermarkText="Buscar cliente"/><asp:ImageButton ID="btn_BusquedaCl" runat="server" CausesValidation="false" 
                ImageUrl="~/images/Search44.png" Text="Busqueda" Visible="False" />
            <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" 
                                                     TargetControlID="txt_BuscaCl" 
                                                    Enabled="True" ValidChars=" abcdefghijklmnñopqrstuvwxyzABCDEFGHIJKLMNÑOPQRSTUVWXYZáéíóúÁÉÍÓÚÜü"></asp:FilteredTextBoxExtender>
            </td></tr>
        <tr>
            <td colspan="5">
                <table style="width: 100%;">
                    <tr>
                        <td align="center" rowspan="2">
                            <%--<asp:TextBox ID="TextBox1" runat="server" onkeyup="return SearchList();"></asp:TextBox><br />--%>
                            <asp:ListBox ID="lb_ClientesDispon" runat="server" Visible="False" 
                                Width="250px"></asp:ListBox>
                        </td>
                        <td align="center">
                            <asp:ImageButton ID="btn_AgregaCliente" runat="server" CausesValidation="false" 
                                ImageUrl="~/images/arrowR.png" Visible="False" />
                        </td>
                        <td align="center" rowspan="2">
                            <asp:ListBox ID="lb_ClientesSelec" runat="server" Visible="False" Width="250px">
                            </asp:ListBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="center">
                            <asp:ImageButton ID="btn_QuitaCliente" runat="server" CausesValidation="false" 
                                ImageUrl="~/images/arrowL.png" Visible="False" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>


    <p>
                        <asp:Label ID="lb_error" runat="server"></asp:Label>
    </p>
           <p>
               <asp:Button ID="btnEnviar" runat="server" CssClass="button2" Text="Enviar" />
               <asp:Button ID="btnModificar" runat="server"  CssClass="button2" Text="Modificar" Visible="false" />
               <asp:Button ID="btnCancelar" runat="server" CssClass="button2" Text="Cancelar" CausesValidation="false" />
           </p>
<%--</ContentTemplate>
</asp:UpdatePanel>--%>

</asp:panel>

    <div class="divContent">
        <div id="filtrosConsulta">

            <div id="lista">
                <asp:DropDownList ID="ddlTiposMov" runat="server" AutoPostBack="true">                    
                    <asp:ListItem Value="1">Compra</asp:ListItem>
                    <asp:ListItem Value="2">Venta</asp:ListItem>
                    <asp:ListItem Value="3">Entrada Física</asp:ListItem>
                    <asp:ListItem Value="4">Salida Física</asp:ListItem>
                </asp:DropDownList>
            </div>

            <div id="campos">
                <%--<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>--%>
                        <asp:DropDownList ID="ddlTiposOp" runat="server" AutoPostBack="true">
                            <asp:ListItem Value="Global">Global</asp:ListItem>
                            <asp:ListItem Value="Particular">Particular</asp:ListItem>
                            <asp:ListItem Value="Conjunto">Conjunto</asp:ListItem>
                        </asp:DropDownList>
                        <asp:TextBox ID="txtCliente" runat="server" Width="100px" Visible="False"></asp:TextBox>
                        <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="txtCliente" Enabled="True" ValidChars=" abcdefghijklmnñopqrstuvwxyzABCDEFGHIJKLMNÑOPQRSTUVWXYZáéíóúÁÉÍÓÚÜü"></asp:FilteredTextBoxExtender>
                        <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" TargetControlID="txtCliente" WatermarkText="Cliente"/>

                        <asp:TextBox ID="txtDespacho" runat="server" Width="100px"></asp:TextBox>
                        <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender5" runat="server" TargetControlID="txtDespacho" Enabled="True" ValidChars=" abcdefghijklmnñopqrstuvwxyzABCDEFGHIJKLMNÑOPQRSTUVWXYZáéíóúÁÉÍÓÚÜü"></asp:FilteredTextBoxExtender>
                        <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender2" runat="server" TargetControlID="txtDespacho" WatermarkText="Despacho"/>

                        <asp:TextBox ID="txtInstitucion" runat="server" Width="100px"></asp:TextBox>
                        <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender6" runat="server" TargetControlID="txtInstitucion" Enabled="True" ValidChars=" abcdefghijklmnñopqrstuvwxyzABCDEFGHIJKLMNÑOPQRSTUVWXYZáéíóúÁÉÍÓÚÜü"></asp:FilteredTextBoxExtender>
                        <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender3" runat="server" TargetControlID="txtInstitucion" WatermarkText="Institución"/>

                        <asp:TextBox ID="txtEmisora" runat="server" Width="100px"></asp:TextBox>
                        <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender4" runat="server" TargetControlID="txtEmisora" WatermarkText="Emisora"/>
                        <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender9" runat="server" TargetControlID="txtEmisora" Enabled="True" ValidChars=" abcdefghijklmnñopqrstuvwxyzABCDEFGHIJKLMNÑOPQRSTUVWXYZáéíóúÁÉÍÓÚÜü"></asp:FilteredTextBoxExtender>

                        <asp:TextBox ID="txtFechaOp" runat="server" Width="130px"></asp:TextBox>
                        <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender5" runat="server" TargetControlID="txtFechaOp" WatermarkText="De"/>
                        <asp:ImageButton ID="calFiltro" runat="server" 
                                ImageUrl="~/images/calendar.gif" CausesValidation="false" />
                        <asp:CalendarExtender ID="CalendarExtender1" runat="server" format="yyyy-MM-dd" PopupButtonID="calFiltro" TargetControlID="txtFechaOp">
                        </asp:CalendarExtender>

                        <asp:TextBox ID="txtFechaLiquid" runat="server" Width="130px"></asp:TextBox>
                        <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender6" runat="server" TargetControlID="txtFechaLiquid" WatermarkText="A"/>
                        <asp:ImageButton ID="calFiltro2" runat="server" 
                                ImageUrl="~/images/calendar.gif" CausesValidation="false" />
                        <asp:CalendarExtender ID="CalendarExtender2" runat="server" format="yyyy-MM-dd" PopupButtonID="calFiltro2" TargetControlID="txtFechaLiquid">
                        </asp:CalendarExtender>
                    <%--</ContentTemplate>--%>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="ddlTiposMov" EventName="SelectedIndexChanged" />
                    </Triggers>
                <%--</asp:UpdatePanel>--%>
            </div>

            <div id="boton">
                <asp:ImageButton ID="btnBusqueda" runat="server" Text="Busqueda"  ImageUrl="~/images/Search44.png" CausesValidation="false"></asp:ImageButton>
            </div>
        </div>
        
        <div id="divGVConsulta">
        <%--<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
            <ContentTemplate>--%>
            <asp:HiddenField ID="href_mot" runat="server" />
                <asp:GridView ID="gvConsulta" runat="server" AutoGenerateColumns="False" Font-Size="X-Small" AllowPaging="True" PageSize="15"
                    PagerStyle-CssClass="PagerColor" CssClass="Gridview" HeaderStyle-CssClass="HeaderFooterGridview" FooterStyle-CssClass="HeaderFooterGridview" CellPadding="5" GridLines="None" AlternatingRowStyle-CssClass="GridviewAlt">
                    <AlternatingRowStyle CssClass="GridviewAlt" Font-Size="X-Small" />
                    <Columns>

                        <asp:TemplateField ShowHeader="False">
                            <ItemTemplate>
                                <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="editarEntrada"
                                    Text="Editar" CommandArgument='<%# Bind("mov_id") %>' OnClientClick="javascript:window.scrollTo(0,0);"></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField ShowHeader="False">
                            <ItemTemplate>
                                <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="eliminarEntrada"
                                    Text="Eliminar" CommandArgument='<%# Bind("mov_id") %>' OnClientClick="javascript:window.scrollTo(0,850);"></asp:LinkButton>
                                <asp:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" TargetControlID="LinkButton2" 
                                    ConfirmText="¿Estas seguro de eliminar el registro?">
                                </asp:ConfirmButtonExtender>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField ShowHeader="False">
                            <ItemTemplate>
                                <asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="False" CommandName="detalleMov"
                                    Text="Detalle" CommandArgument='<%# Bind("mov_id") %>' OnClientClick="javascript:window.scrollTo(0,850);"></asp:LinkButton>
                                    <%--<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" BackgroundCssClass="modalBackground" DropShadow="false" PopupControlID="pnlPopUp" TargetControlID="LinkButton3" PopupDragHandleControlID="pnlPopUp" CancelControlID="btnCerrar" ></asp:ModalPopupExtender>--%>
                                <%--<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="LinkButton3" PopupControlID="popup" OkControlID="ok_button"></asp:ModalPopupExtender>--%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="nombreC" HeaderText="Cliente" Visible="false" />
                        <asp:BoundField DataField="mov_operacion" HeaderText="Tipo de Movimiento" />
                        <asp:BoundField DataField="mov_tipo" HeaderText="Tipo de Operacion" />
                        <asp:BoundField DataField="Despacho" HeaderText="Despacho" />
                        <asp:BoundField DataField="Institución" HeaderText="Institución" />
                        <asp:BoundField DataField="Emisora" HeaderText="Emisora" />
                        <asp:BoundField DataField="tipo_nombre" HeaderText="Tipo de Emisora" />
                        <asp:BoundField DataField="Titulos" HeaderText="Títulos" />
                        <asp:BoundField DataField="mov_costo" HeaderText="Costo" DataFormatString="{0:C}" />
                        <asp:BoundField DataField="Fecha de Operación" HeaderText="Fecha de Operación" DataFormatString="{0:dd-M-yyyy}" />
                        <asp:BoundField DataField="Fecha de Liquidación" HeaderText="Fecha de Liquidación" DataFormatString="{0:dd-M-yyyy}" />
                        <asp:BoundField DataField="mov_plazo" HeaderText="Plazo" />
                        <asp:BoundField DataField="mov_plazo_cupon" HeaderText="Plazo Cupón" />
                        <asp:BoundField DataField="mov_tasa" HeaderText="Tasa" />
                    </Columns>
                </asp:GridView>
                <asp:Button ID="ok_button" runat="server" style="display:none;" />
                <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="ok_button" 
                    PopupControlID="divPopup" BackgroundCssClass="popUpStyle" PopupDragHandleControlID="panelDragHandle" 
                    CancelControlID="btnCerrar" DropShadow="true" >
                </asp:ModalPopupExtender>   
                <br />
                <div class="popUpStyle" id="divPopup" style="display:none;" >
                    <asp:Panel runat="server" ID="panelDragHandle" CssClass="drag"    >
                    </asp:Panel>
                        <asp:GridView ID="gridDetalle" runat="server" AutoGenerateColumns="False">
                                    <Columns>            
                                        <asp:BoundField DataField="Nombre" HeaderText="Nombre" />
                                        <asp:BoundField DataField="mov_operacion" HeaderText="Operación" />
                                        <asp:BoundField DataField="mov_tipo" HeaderText="Tipo Operación" />
                                        <asp:BoundField DataField="num_titulos" HeaderText="Titulos" /> 
                                        <asp:BoundField DataField="dm_PorcentajeAsign" HeaderText="Porcentaje" />                                        
                                    </Columns>
                        </asp:GridView>
                    <%--<asp:LinkButton runat="server" ID="btnCerrar" Text="Cerrar"   />--%>
                    <%--<asp:LinkButton runat="server" ID="btnExportar" Text="Exportar"  />--%>
                     <%--<asp:LinkButton id="LinkButton1" Text="Click Me" Font-Names="Verdana" Font-Size="14pt" OnClick="LinkButton_Click" runat="server"/>--%>
                     <asp:Button ID="btnCerrar" runat="server" Text="Cerrar" /> 
                    <asp:Button ID="btnExportar" runat="server"  Text="Exportar" CausesValidation="false"   />
                </div>
            <%--</ContentTemplate>--%>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="ddlTiposMov" EventName="SelectedIndexChanged"/>
                <asp:AsyncPostBackTrigger ControlID="btnBusqueda" EventName="Click" />
            </Triggers>  
        <%--</asp:UpdatePanel>--%>
      </div>
    </div>
</center>
<br />